<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">  <!--IE兼容模式-->

    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="renderer" content="webkit">   <!--国产浏览器高速模式-->

    <title>医学大数据平台</title>

    <link href="<?php echo e(asset('css/sui.min.css')); ?>" rel="stylesheet">
    <link href="<?php echo e(asset('css/sui-append.css')); ?>" rel="stylesheet">
    <link href="<?php echo e(asset('static/bootstrap/css/bootstrap.min.css')); ?>" rel="stylesheet">
    <link href="<?php echo e(asset('css/style.css')); ?>" rel="stylesheet">
    <!--通用样式 1-->
    <link href="<?php echo e(asset('css/common.css')); ?>" rel="stylesheet">
    <!--本页文件 1-->
    <link href="<?php echo e(asset('css/login.css')); ?>" rel="stylesheet">
    <link href="<?php echo e(asset('css/styleNew.css')); ?>" rel="stylesheet">


    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <meta name="viewport" content="width=device-width, initial-scale=1">

</head>

<body>

<div class="container-fluid">

    <div class="line col-xs-2"></div>
    <div class="lineTransL col-xs-1"></div>
    <div class="col-xs-7 row logo-title">
        <div class="col-xs-6" style="margin-left: 8%">
            <img class="logo" src="<?php echo e(asset('static/images/sti-logo.png')); ?>">
            <span class="LogoText">国家科技信息资源综合利用与公共服务中心</span>
            
            
        </div>
        <div class="col-xs-5 ">
            <img class="logo hospitalLogo" src="<?php echo e(asset('static/images/hospitalLogo.png')); ?>">
            <span class="LogoText hospitalText">中国中医科学院广安门医院</span>
            
            
        </div>
    </div>
    <div class="lineTransR col-xs-1"></div>
    <div class="line col-xs-2"></div>


    <div class="row">
        <div class="col-xs-12 text-center">
            <div class="login-box">
                <h2>
                    <div class="welcome"><span class="small">基于</span>精准医疗模式的糖尿病中医防治与管理<span class="small">建立</span></div>
                    <div class="intro ">血糖精细化管理平台</div>
                </h2>
                <form action="<?php echo e(route('manage.login')); ?>" name="loginForm">
                    <?php echo e(csrf_field()); ?>

                    <input name="phone" type="number" class="form-control phone" placeholder="请输入您的账号">
                    <i class="rightUser"><b class="img"></b></i>
                    <input name="password" type="password" class="form-control" placeholder="请输入您的密码">
                    <i class="rightPass"><b class="img"></b></i>

                    <p id="loginBtn" style="cursor: pointer">
                        登 &nbsp; 录
                        
                        
                    </p>
                </form>
            </div>
        </div>
    </div>
    <div class="row textParent">
        <div class="maintext">
            <div class="lineO">结构化电子病历</div>
            <div class="lineT">病历规范化</div>

        </div>
        <div class="maintext">
            <div class="lineO">多渠道、多智能设备接入</div>
            <div class="lineT">检测各类数据</div>
        </div>
        <div class="maintext">
            <div class="lineO">精准医疗，一站式服务</div>
            <div class="lineT">全程解决方案</div>
        </div>
        <div class="maintext">
            <div class="lineO">双向转诊对城市医疗资源</div>
            <div class="lineT">进行优化整合，促使基本</div>
            <div class="lineT">医疗逐步下沉社区</div>
        </div>
        <div class="maintext">
            <div class="lineO"> 院内院外一体化管理</div>
            <div class="lineT">动态跟踪，形成闭环</div>
        </div>


    </div>
</div>
<script src="<?php echo e(asset('js/jquery.1.12.4.min.js')); ?>"></script>
<script src="<?php echo e(asset('static/bootstrap/js/bootstrap.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/sui.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/checkFunction.js')); ?>"></script>
<script>
    $('.login-box input.phone').bind('input.phone propertychange', function () {
        var reg = /^\d+$/;
        if($(this).val().length == 11){
            $("input[name=phone]").blur();
            $("input[name=password]").focus();
        }
        else if ($(this).val().length > 11) {
            $(this).val($(this).val().slice(0, 11));
        } else {
            if (!(reg.test($(this).val()))) {
                $(this).val($(this).val().slice(0, $(this).val().length - 1));
            }
        }
    });
    $('#loginBtn').click(function () {
        var phone = $('input[name="phone"]').val();
        var password = $('input[name="password"]').val();
        if (!checkPhone(phone)) {
            $.alert({
                title: '温馨提示',
                body: '请输入正确手机号！',
                transition: true
            });
            return;
        }
        if (password.length < 6) {
            $.alert({
                title: '温馨提示',
                body: '密码长度要不小于6位！',
                transition: true
            });
            return;
        }

        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            },
            statusCode: {
                422: function (data) {
                    var mess = eval('(' + data.responseText + ')');
                    if (!($(".sui-modal").css("display") === 'block')) {

                        for (var key in mess) {
                            $.alert({
                                title: '温馨提示',
                                body: mess[key],
                                transition: true
                            });
                            break;
                        }
                    }

                },
                423: function (data) {
                    var mess = eval('(' + data.responseText + ')');
                    if (!($(".sui-modal-backdrop").css("display") === 'block')) {
                        for (var key in mess) {
                            $.alert({
                                title: '温馨提示',
                                body: mess[key],
                                transition: true
                            });
                            break;
                        }
                    }

                }
            }
        });
        var url = $('form[name="loginForm"]').attr('action');
        $.post(url, {phone: phone, password: password}, function (data) {
            if (data.code == '10000') {
                window.location.href = data.data.url;
            } else {
                $.alert({
                    title: '温馨提示',
                    body: data.data.message,
                    transition: true
                });
            }
        }, 'json');
    });
    $(document).keydown(function (e) {
        if (e.keyCode == 13) {
            if (!($(".sui-modal-backdrop").css("display") === 'block')) {
                $('#loginBtn').click();
            }
        }
    });


</script>
<script type="text/javascript">
    //调整平板端 适配⬇️  模拟机测试没问题！
    window.onresize = function () {
        $(".screen").remove();
        setTimeout(function(){
            $('head').append('<meta class="screen" content="width=device-width,initial-scale=' + screen.width / 1400 + ', user-scalable=1" name="viewport" />')

        },10)
//        document.write('<meta content="width=device-width,initial-scale=' + screen.width/1600  + ', user-scalable=1" name="viewport" />');
    }
    setTimeout(function(){
        $('head').append('<meta class="screen" content="width=device-width,initial-scale=' + screen.width / 1400 + ', user-scalable=1" name="viewport" />')

    },10)
</script>
</body>

</html>